package com.vframework.jms;

import org.apache.log4j.Logger;

import com.util.SpringUtil;

/**
 * 
 * Eop消费者
 * @author shanzhitong
 *
 */
public class EopConsumer {
	
	protected final Logger logger = Logger.getLogger(getClass());
	
	public void execute(IEopJmsMessage message){
		try{
//		    System.out.println(message);
			Object data = message.getData();
			String processorid = (String)message.getProcessorBeanId();
			IJmsProcessor processor = (IJmsProcessor) SpringUtil.getBean(processorid);
			processor.process(data);
		}catch(Exception e){
			this.logger.error("Jms消息执行出错",e);
		}
	}
}